﻿
<div id="f_pst" class="bm">
    <div class="bm_h">
        <h2>快速发帖</h2>
    </div>
    <div class="bm_c">
        <form>
            <div id="fastpostreturn" style="margin:-5px 0 5px"></div>
            <div class="pbt cl">
                <div class="ftid">
                    <select name="typeid" id="typeid_fast" width="80" selecti="0" style="display: none;">
                        <option value="0"></option>
                    </select>
                    <select name="topic-class-id">
                    	<?php 
                    		foreach ($Area as $key1 => $value1) {
						$TopicClass = GetTopicClass($Area[$key1][$KeyTopicAreaId]);
                            	foreach ($TopicClass as $key2 => $value2) {
                    		?>
                    	<option <?php 
                    		if($TopicClass[$key2][$KeyTopicClassId]==$Topic_Class_Id){
                    			echo "selected='selected'";
                    		}
                    		?> value="<?php echo $TopicClass[$key2][$KeyTopicClassId]; ?>"><?php echo $TopicClass[$key2][$KeyTopicClassName]; ?></option>
                    	<?php 
                    		}
                    		}?>
                    </select>
                </div>
                <input type="text" id="subject" name="topic-title" class="px" value="" onkeyup="strLenCalc(this, 'checklen', 80);" tabindex="11" style="width: 25em">
                <span>还可输入 <strong id="checklen">80</strong> 个字符</span>
            </div>

            <div class="cl">
                <div id="fastsmiliesdiv" class="y">
                    <div id="fastsmiliesdiv_data">
                        <div id="fastsmilies">
                            <table cellspacing="0" cellpadding="0">
                                <tbody>
                                    <tr></tr>
                                    <tr>
                                        <td onmouseover="smilies_preview('fastpost', 'fastsmiliesdiv', this, 20)" onmouseout="$('smilies_preview').style.display = 'none'" onclick="seditor_insertunit('fastpost', ':)')" id="fastpostsmilie_1_td"><img id="smilie_1" width="20" height="20" src="img/smile.gif" alt=":)"></td>
                                        <td onmouseover="smilies_preview('fastpost', 'fastsmiliesdiv', this, 20)" onmouseout="$('smilies_preview').style.display = 'none'" onclick="seditor_insertunit('fastpost', ':(')" id="fastpostsmilie_2_td"><img id="smilie_2" width="20" height="20" src="img/sad.gif" alt=":("></td>
                                        <td onmouseover="smilies_preview('fastpost', 'fastsmiliesdiv', this, 20)" onmouseout="$('smilies_preview').style.display = 'none'" onclick="seditor_insertunit('fastpost', ':D')" id="fastpostsmilie_3_td"><img id="smilie_3" width="20" height="20" src="img/biggrin.gif" alt=":D"></td>
                                        <td onmouseover="smilies_preview('fastpost', 'fastsmiliesdiv', this, 20)" onmouseout="$('smilies_preview').style.display = 'none'" onclick="seditor_insertunit('fastpost', ':\'(')" id="fastpostsmilie_4_td"><img id="smilie_4" width="20" height="20" src="img/cry.gif" alt=":'("></td>
                                    </tr>
                                    <tr>
                                        <td onmouseover="smilies_preview('fastpost', 'fastsmiliesdiv', this, 20)" onmouseout="$('smilies_preview').style.display = 'none'" onclick="seditor_insertunit('fastpost', ':@')" id="fastpostsmilie_5_td"><img id="smilie_5" width="20" height="20" src="img/huffy.gif" alt=":@"></td>
                                        <td onmouseover="smilies_preview('fastpost', 'fastsmiliesdiv', this, 20)" onmouseout="$('smilies_preview').style.display = 'none'" onclick="seditor_insertunit('fastpost', ':o')" id="fastpostsmilie_6_td"><img id="smilie_6" width="20" height="20" src="img/shocked.gif" alt=":o"></td>
                                        <td onmouseover="smilies_preview('fastpost', 'fastsmiliesdiv', this, 20)" onmouseout="$('smilies_preview').style.display = 'none'" onclick="seditor_insertunit('fastpost', ':P')" id="fastpostsmilie_7_td"><img id="smilie_7" width="20" height="20" src="img/tongue.gif" alt=":P"></td>
                                        <td onmouseover="smilies_preview('fastpost', 'fastsmiliesdiv', this, 20)" onmouseout="$('smilies_preview').style.display = 'none'" onclick="seditor_insertunit('fastpost', ':$')" id="fastpostsmilie_8_td"><img id="smilie_8" width="20" height="20" src="img/shy.gif" alt=":$"></td>
                                    </tr>
                                    <tr>
                                        <td onmouseover="smilies_preview('fastpost', 'fastsmiliesdiv', this, 20)" onmouseout="$('smilies_preview').style.display = 'none'" onclick="seditor_insertunit('fastpost', ';P')" id="fastpostsmilie_9_td"><img id="smilie_9" width="20" height="20" src="img/titter.gif" alt=";P"></td>
                                        <td onmouseover="smilies_preview('fastpost', 'fastsmiliesdiv', this, 20)" onmouseout="$('smilies_preview').style.display = 'none'" onclick="seditor_insertunit('fastpost', ':L')" id="fastpostsmilie_10_td"><img id="smilie_10" width="20" height="20" src="img/sweat.gif" alt=":L"></td>
                                        <td onmouseover="smilies_preview('fastpost', 'fastsmiliesdiv', this, 20)" onmouseout="$('smilies_preview').style.display = 'none'" onclick="seditor_insertunit('fastpost', ':Q')" id="fastpostsmilie_11_td"><img id="smilie_11" width="20" height="20" src="img/mad.gif" alt=":Q"></td>
                                        <td onmouseover="smilies_preview('fastpost', 'fastsmiliesdiv', this, 20)" onmouseout="$('smilies_preview').style.display = 'none'" onclick="seditor_insertunit('fastpost', ':lol')" id="fastpostsmilie_12_td"><img id="smilie_12" width="20" height="20" src="img/lol.gif" alt=":lol"></td>
                                    </tr>
                                    <tr>
                                        <td onmouseover="smilies_preview('fastpost', 'fastsmiliesdiv', this, 20)" onmouseout="$('smilies_preview').style.display = 'none'" onclick="seditor_insertunit('fastpost', ':loveliness:')" id="fastpostsmilie_13_td"><img id="smilie_13" width="20" height="20" src="img/loveliness.gif" alt=":loveliness:"></td>
                                        <td onmouseover="smilies_preview('fastpost', 'fastsmiliesdiv', this, 20)" onmouseout="$('smilies_preview').style.display = 'none'" onclick="seditor_insertunit('fastpost', ':funk:')" id="fastpostsmilie_14_td"><img id="smilie_14" width="20" height="20" src="img/funk.gif" alt=":funk:"></td>
                                        <td onmouseover="smilies_preview('fastpost', 'fastsmiliesdiv', this, 20)" onmouseout="$('smilies_preview').style.display = 'none'" onclick="seditor_insertunit('fastpost', ':curse:')" id="fastpostsmilie_15_td"><img id="smilie_15" width="20" height="20" src="img/curse.gif" alt=":curse:"></td>
                                        <td onmouseover="smilies_preview('fastpost', 'fastsmiliesdiv', this, 20)" onmouseout="$('smilies_preview').style.display = 'none'" onclick="seditor_insertunit('fastpost', ':dizzy:')" id="fastpostsmilie_16_td"><img id="smilie_16" width="20" height="20" src="img/dizzy.gif" alt=":dizzy:"></td>
                                    </tr>
                                    <tr>
                                        <td onmouseover="smilies_preview('fastpost', 'fastsmiliesdiv', this, 20)" onmouseout="$('smilies_preview').style.display = 'none'" onclick="seditor_insertunit('fastpost', ':shutup:')" id="fastpostsmilie_17_td"><img id="smilie_17" width="20" height="20" src="img/shutup.gif" alt=":shutup:"></td>
                                        <td onmouseover="smilies_preview('fastpost', 'fastsmiliesdiv', this, 20)" onmouseout="$('smilies_preview').style.display = 'none'" onclick="seditor_insertunit('fastpost', ':sleepy:')" id="fastpostsmilie_18_td"><img id="smilie_18" width="20" height="20" src="img/sleepy.gif" alt=":sleepy:"></td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
                <div class="hasfsl" id="fastposteditor">
                    <div class="tedt">
                        <div class="bar">
                            <span class="y">
                                <a href="" onclick="">高级模式</a>
                            </span>
                            <script src="Scripts/seditor.js?yLY" type="text/javascript"></script>
                            <div class="fpd">
                                <a href="javascript:;" title="文字加粗" class="fbld" onclick="seditor_insertunit('fastpost', '[b]', '[/b]');doane(event);">B</a>
                                <a href="javascript:;" title="设置文字颜色" class="fclr" id="fastpostforecolor" onclick="showColorBox(this.id, 2, 'fastpost');doane(event);">Color</a>
                                <a id="fastpostimg" href="javascript:;" title="图片" class="fmg" onclick="seditor_menu('fastpost', 'img');doane(event);">Image</a>
                                <a id="fastposturl" href="javascript:;" title="添加链接" class="flnk" onclick="seditor_menu('fastpost', 'url');doane(event);">Link</a>
                                <a id="fastpostquote" href="javascript:;" title="引用" class="fqt" onclick="seditor_menu('fastpost', 'quote');doane(event);">Quote</a>
                                <a id="fastpostcode" href="javascript:;" title="代码" class="fcd" onclick="seditor_menu('fastpost', 'code');doane(event);">Code</a>
                                <a href="javascript:;" class="fsml" id="fastpostsml" onclick="showMenu({'ctrlid':this.id,'evt':'click','layer':2});return false;">Smilies</a>
                            </div>
                        </div>
                      	<?php 
            				if(isset($_SESSION['state'])&&$_SESSION['state']==TRUE){
  						?>
                            <div class="area">
                                <textarea rows="6" cols="80" name="topic-content" id="fastpostmessage" onkeydown="seditor_ctlent(event, '$(\'fastpostsubmit\').click()');" tabindex="12" class="pt"></textarea>
                            </div>
                       <?php
                			}
                			else
                			{
                		?>
                            <div class="area">
                                <div class="pt hm">
                                    您需要登录后才可以发帖
                                    <a onclick="loginClick();" class="xi2" style="cursor: pointer;">登录</a> |
                                    <a class="xi2" onclick="registerClick();" style="cursor: pointer;">立即注册</a>
                                </div>
                            </div>
                        <?php
                			}
                		?>
                    </div>
                </div>
                <script type="text/javascript">
                    var editorid = '';
                    var ATTACHNUM = {
                        'imageused': 0,
                        'imageunused': 0,
                        'attachused': 0,
                        'attachunused': 0
                    },
                        ATTACHUNUSEDAID = new Array(),
                        IMGUNUSEDAID = new Array();
                </script>
                <script src="Scripts/swfupload.js?yLY" type="text/javascript"></script>
                <script src="Scripts/swfupload.queue.js?yLY" type="text/javascript"></script>
                <script src="Scripts/handlers.js?yLY" type="text/javascript"></script>
                <script src="Scripts/fileprogress.js?yLY" type="text/javascript"></script>
            </div>
            <p class="ptm pnpost">
            	<?php 
            		if(isset($_SESSION['state'])&&$_SESSION['state']==TRUE){
            	?>
                    <a class="pn pnc" onclick="postclick();" style="height: 30px;"><strong>发表帖子</strong></a>
                <?php
                	}
                	else
                	{
                ?>
                    <a  class="pn pnc" disabled="disabled" style="cursor:not-allowed;"><strong>发表帖子</strong></a>
               <?php
               	 	}
                ?>
            </p>
        </form>
    </div>
</div>